<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

</head>
<body>
	<div class="header-block">
		<p>Online Store</p>

		<c:url value="/logout" var="logoutUrl" />
		<form action="${logoutUrl}" method="post" id="logoutForm">
			<input type="hidden" name="${_csrf.parameterName}"
				value="${_csrf.token}" />
		</form>
		<script>
			function formSubmit() {
				document.getElementById("logoutForm").submit();
			}
		</script>

		<c:if test="${pageContext.request.userPrincipal.name != null}">
			<h5 style="color: white;">
				Welcome : ${pageContext.request.userPrincipal.name} | <a
					href="javascript:formSubmit()"> Logout</a> | <a href="http://localhost:8080/onlinestore/" target="_blank" style="color: white;">Xem Trang Web</a>
			</h5>
		</c:if>
		<div class="nav-menu">
			<ul class="level1">
				<li><a href="category.html?categoryId=0">Danh Mục</a></li>
				<li><a href="product.html">Sản Phẩm</a></li>
				<li><a href="acount.html">Tài Khoản</a></li>
				<li><a href="bill.html">Đơn Hàng</a></li>
				<li><a href="bonus.html">Khuyến Mãi</a></li>
			</ul>
		</div>
	</div>
</body>
